<?php 
/**
 * 评论管理控制器
 */
class CommentController extends AuthController{
	public function index(){
		$data = M('')->join('__goods__ as g JOIN __comment__ as c ON g.gid = c.goods_gid JOIN __user__ as u ON u.uid=c.user_uid')->all();
		$this->assign('data',$data);
		$this->display();
	}
	
	/**
	 * 删除评论
	 */
	 public function delete(){
	 	$coid = Q('get.coid',0,'intval');
		if($coid){
			K('Comment')->where("coid={$coid}")->delete();
			$this->success('删除成功');
		}
		
	 }
	
}


















 ?>